using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Security.Cryptography;
using System.Collections.Generic;
using System.Text;

public class EncryptMD5
{
    public string encrypt(string pass)
    {
        MD5 md5 = MD5CryptoServiceProvider.Create();
        byte[] hash;
        ASCIIEncoding enc = new ASCIIEncoding();
        byte[] buffer = enc.GetBytes(pass);
        hash = md5.ComputeHash(buffer);
        string cuoicung = "";
        cuoicung = Convert.ToBase64String(hash);
        return cuoicung;
    }
}
